﻿<CustomWindow:PT_CustomWindow x:Class="Views.ViewMainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:CustomWindow="clr-namespace:CustomWindow;assembly=PT_CustomWindow"
    xmlns:TxGar="clr-namespace:TauxGaranti"
    xmlns:ViewModels="clr-namespace:TauxGaranti.ViewModels"                          
    DataContext="{Binding Source={x:Static ViewModels:Locator.ViewModeleMainWindowStatic}}"
    WindowStartupLocation="CenterScreen"
    Width="900"
    Height="500"
    Title="OMANE">

    <Border BorderBrush="{DynamicResource BrushCouleur1Base}" 
            BorderThickness="1" 
            Background="White">

        <DockPanel Background="{StaticResource DegradeBckTitre}" 
                   Name="dckPanelOMANE">

            <!-- Grid Title -->
            <Grid x:Name="GridTitle" DockPanel.Dock="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="25" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Rectangle Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Fill="{StaticResource DegradeBckBarreTitre}" ></Rectangle>
                <StackPanel x:Name="WindowButtons" 
                        Grid.Column="1" 
                        Orientation="Horizontal" 
                        HorizontalAlignment="Right" 
                        Margin="5,0,0,0">
                    <Border Name="WindowButtonsPlaceholder" 
                            HorizontalAlignment="Right" 
                            VerticalAlignment="Top"
                            Margin="0,-1,10,0" />
                </StackPanel>
                <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
                    <TextBlock FontSize="16" Foreground="White" FontWeight="Normal" Margin="7,0,0,0">OMANE</TextBlock>
                    <TextBlock Foreground="White" Margin="5,0,0,0"></TextBlock>
                </StackPanel>
            </Grid>

            <!-- Menu -->
            <Menu Padding="0,1,0,0" DockPanel.Dock="Top" Height="24" Name="MenuOMANE" Style="{StaticResource MenuStyle}">
                <MenuItem Header="Fichier">
                    <MenuItem Header="Ouvrir" />
                    <MenuItem Header="Fermer" />
                </MenuItem>
                <MenuItem Header="Edition" />
                <MenuItem  Header="Outils" />
            </Menu>

            <!--<StatusBar DockPanel.Dock="Bottom" 
                       Height="24" 
                       Name="StatusBarOMANE" 
                       Background="{StaticResource BrushCouleur1BckFonce}"/>-->

            <!-- Contenu de la fenêtre -->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="90*" />
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="168*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="5" />
                </Grid.RowDefinitions>
                <Rectangle Grid.ColumnSpan="3" Grid.RowSpan="2" Fill="{StaticResource DegradeBckFenetre}" />
                <Thumb Grid.ColumnSpan="3" 
                       Grid.Row="1"
                       DragDelta="Thumb_DragDelta"
                       HorizontalAlignment="Right" 
                       DockPanel.Dock="Bottom"
                       Cursor="SizeNWSE"
                       Height="5"/>
                <GridSplitter Grid.Column="1" 
                          HorizontalAlignment="Stretch" 
                          VerticalAlignment="Stretch" 
                          Background="Transparent" />
                <Grid Grid.Column="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="41" MaxHeight="181" MinHeight="41" />
                    </Grid.RowDefinitions>
                    <GridSplitter Grid.Row="1"
                              DragIncrement="35"
                              VerticalContentAlignment="Top"
                              VerticalAlignment="Top" 
                              HorizontalAlignment="Stretch" 
                              Height="5" 
                              Background="Transparent" />
                    <TxGar:ViewTrvNavig Grid.Row="0" />
                    <StackPanel Grid.Row="1" Margin="5,5,0,0" Background="{StaticResource BrushCouleur1Base}">
                        <RadioButton Style="{StaticResource btn}" IsChecked="True">ETUDE</RadioButton>
                        <RadioButton Style="{StaticResource btn}">INVENTAIRE</RadioButton>
                        <RadioButton Style="{StaticResource btn}">INDICATEURS</RadioButton>
                        <RadioButton Style="{StaticResource btn}">FORMATION</RadioButton>
                        <RadioButton Style="{StaticResource btn}" Margin="0,0,0,1"></RadioButton>
                    </StackPanel>
                </Grid>


                <Grid Grid.Column="2" Margin="0,0,5,0" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="41" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>


                    <TabControl Margin="0,10,0,0" 
                                Grid.Row="1"  
                                Style="{StaticResource tbControlOMANE}"
                                ItemsSource="{Binding Workspaces}"
                                ItemContainerStyle="{StaticResource tbControlItem}"
                                IsSynchronizedWithCurrentItem="True">
                        <TabControl.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="{Binding Converter={StaticResource CommandToIconConverter}}" Margin="2,0,0,0" ></Image>
                                    <TextBlock Text="{Binding DisplayName}" Margin="5,0,0,0" />
                                </StackPanel>
                            </DataTemplate>
                        </TabControl.ItemTemplate>
                    </TabControl>

                    <!-- <TabControl Margin="10,10,-1,-1"
                                BorderBrush="Orange"
                                Grid.Row="1" >
                        <TabItem Header="Tes1t">
                            Test toto
                        </TabItem> -->
                    <!-- Style="{DynamicResource tbControl}"
                                ItemsSource="{Binding CommandsTxGarEncours}"
                                ItemContainerStyle="{StaticResource tbControlItem}">-->
                    <!--<TabControl.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="{Binding Converter={StaticResource CommandToIconConverter}}" Margin="3,0,0,0" ></Image>
                                    <TextBlock Text="{Binding DisplayName}" Margin="5,0,0,0" />
                                </StackPanel>
                            </DataTemplate>
                        </TabControl.ItemTemplate>-->
                    <!--</TabControl>-->

                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="130" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Image Stretch="Fill" Grid.Column="0" Source="../Images/logo NA seul.jpg" />
                        <Image Stretch="Fill" Grid.Column="1" Source="../Images/visuel seul.jpg" />
                        <!--<Rectangle Grid.Column="1">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{StaticResource CoulBandeau}" />
                            </Rectangle.Fill>
                        </Rectangle>-->
                    </Grid>
                    <!--<TabControl Grid.Row="1" Style="{StaticResource tbControl}">
                    <TabItem Header="Toto">
                        Tot
                    </TabItem>
                    <TabItem Header="tit">
                        Tit
                    </TabItem>
                </TabControl>-->
                </Grid>
            </Grid>

            <!--<Thumb  Cursor="SizeNWSE"/>-->
            <!--<Thumb DragDelta="Thumb_DragDelta" HorizontalAlignment="Right" DockPanel.Dock="Bottom"
                   Cursor="SizeNWSE" />-->
        </DockPanel>
    </Border>
</CustomWindow:PT_CustomWindow>